package marketing

import (
	"jlpay-sdk-go/pkg/jlpay/core"
	"jlpay-sdk-go/pkg/jlpay/models/marketing"
	"jlpay-sdk-go/pkg/jlpay/services"
)

// MerchantActivityBalanceQueryService 商户活动余额查询服务
type MerchantActivityBalanceQueryService struct {
	*services.BaseService
}

// NewMerchantActivityBalanceQueryService 创建新的商户活动余额查询服务
func NewMerchantActivityBalanceQueryService(config *core.Config) *MerchantActivityBalanceQueryService {
	return &MerchantActivityBalanceQueryService{
		BaseService: services.NewBaseService(config),
	}
}

// Execute 执行商户活动余额查询请求
func (s *MerchantActivityBalanceQueryService) Execute(request *marketing.MerchantActivityBalanceQueryRequest) (*marketing.MerchantActivityBalanceQueryResponse, error) {
	response := marketing.NewMerchantActivityBalanceQueryResponse()
	err := s.Post(request, response, "/open/org/bank/act-bridge/act-merch/query")
	if err != nil {
		return nil, err
	}
	return response, nil
}
